package org.lql.chaos.kafka.example.context;

/**
 * @author: liangqinglong
 * @date: 2025-08-10 14:58
 * @description: 分区策略上下文
 **/
public class PartitionStrategyContext {

	private static final ThreadLocal<String> strategyHolder = new ThreadLocal<>();

	public static void setStrategy(String strategy) {
		strategyHolder.set(strategy);
	}

	public static String getStrategy() {
		return strategyHolder.get();
	}

	public static void clear() {
		strategyHolder.remove();
	}
}
